package com.sq.partner.manager.dao;
import java.util.List;
import java.util.Map;

import com.sq.partner.manager.mybatis.model.GatewayUser;
import com.sq.partner.manager.mybatis.model.NlifePlan;
import com.sq.partner.manager.mybatis.model.RuleDefinition;
import com.sq.partner.manager.mybatis.model.RuleTemplate;
import com.sq.partner.manager.mybatis.model.RuleTemplateRale;
import com.sq.partner.manager.util.Page;

public interface RuleConfigerDao extends BaseDao {
	
	public Page<Map<String, Object>> queryPlanPageByCriteria(Page<Map<String, Object>> page,
			GatewayUser user) throws Exception ;
	
	public List<Map<String, Object>> queryTemplate(Map<String, Object> map)
			throws Exception;
	
	public List<Map<String, Object>> queryEditTemplate(Map<String, Object> map)
			throws Exception;
	
	public String queryNextRuleId(String string) throws Exception;
	
	public Boolean saveRuleDefinition(RuleDefinition definition) throws Exception ;
	
	public Boolean insertRuleTemplateRaleList(List<RuleTemplateRale> list) throws Exception ;
	
	public  Page<RuleDefinition> queryDefinitionPage(Page<RuleDefinition> page) throws Exception;
	
	public Map<String, Object> queryDefinitionById(String id) throws Exception;
	/***
	 * 修改
	 * @param definition
	 * @return
	 * @throws Exception
	 */
	public Boolean editRuleDefinition(RuleDefinition definition) throws Exception ;
	
	/***
	 * 删除
	 * @param definition
	 * @return
	 * @throws Exception
	 */
	public Boolean deleteTemplatByRuleId(String id) throws Exception ;
	
	/***
	 * 删除规则
	 * @param definition
	 * @return
	 * @throws Exception
	 */
	public Boolean deleteRuleByRuleId(String id) throws Exception ;

	String queryMaxOccup(Map<String, Object> map) throws Exception;
}


